import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import demo.Test;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 30318
 * Date: 2023-05-17
 * Time: 12:38
 */
class Person{
    private String name;//此时name只能在当前类内部进行访问

    public int age;

    String sex;//默认是default权限：默认权限

    public Person() {

    }

    public void setName(String name){
        this.name = name;
}

    public String getName(){
        return this.name;
    }

    public void show(){
        System.out.println("姓名："+name+" 年龄："+age);
    }
}

public class Student {

    public static void main1(String[] args) {
        Person person = new Person();
        //person.name = "张三";
        person.setName("张三");
        System.out.println(person.getName());
    }

    public static void main2(String[] args) {
        Test test = new Test();
        //System.out.println(test.a);
    }

    public static void main(String[] args) {
        demo.Test test = new demo.Test();
    }
}
